import QtQuick 2.0

Rectangle {
    id: button
    signal clicked
    property alias text: txt.text
    property int textSize: 19
    property bool buttonEnabled: false
    property bool buttonPressed: false
    width: Math.max(64, txt.width + 16)
    height: 32
    border.color: "#363636"
    radius: 5
    color: "transparent"
    MouseArea {
        anchors.fill: parent
        onPressedButtonsChanged: button.buttonPressed = !button.buttonPressed
        onClicked: button.clicked()
    }
    Text {
        id: txt
        anchors.centerIn: parent
        font.family: "Open Sans"
        font.pointSize: button.textSize
        font.weight: Font.DemiBold
        color: button.buttonPressed ? "#363636" : "#14aaff"
    }
}

